Attribute VB_Name = "basicM"
Option Explicit


Public PRN_FILENAME As String

Sub Set_StkBin_DDLB(v As VisM, ByVal Locdesc As String, cb As ComboBox)
    Dim cnt As Integer
    Dim i As Integer
    Dim stkbin As String
    
    cb.clear
    
    Call Restore_Connect(v)
    v.P1 = Locdesc
    v.Execute "$$GetAllStkBin^DHCSTKQUERY(P1)"
    If v.Value = "" Then v.Value = "0"
    cnt = CInt(v.Value)
    If cnt > 0 Then
        For i = 1 To cnt
            v.P0 = i
            
            Call Restore_Connect(v)
            v.Execute "$$ListAllStkBin^DHCSTKQUERY(P0)"
            stkbin = v.Value
            cb.AddItem (stkbin)
        Next
    End If
End Sub

